﻿Imports System.ComponentModel
Imports DevExpress.Skins
Imports DevExpress.LookAndFeel
Imports DevExpress.UserSkins
Imports DevExpress.XtraBars.Helpers
Imports DevExpress.XtraBars.Ribbon
Imports SERM.Core

Public Class SERMTempForm
    Protected _dataContext As SermDataContext

    Public Property Caption As String
        Get
            Return Me.Text
        End Get
        Set(value As String)
            Me.Text = value
        End Set
    End Property
    Public Property DataContext As SermDataContext
        Get
            Return _dataContext
        End Get
        Set(value As SermDataContext)
            _dataContext = value
        End Set
    End Property

    Sub New()
        InitSkins()
        InitializeComponent()
        Me.InitSkinGallery()

    End Sub
    Sub InitSkins()
        DevExpress.Skins.SkinManager.EnableFormSkins()
        DevExpress.UserSkins.BonusSkins.Register()
        UserLookAndFeel.Default.SetSkinStyle("DevExpress Style")

    End Sub
    Private Sub InitSkinGallery()
        SkinHelper.InitSkinGallery(rgbiSkins, True)
    End Sub
    Protected Friend Function NewDocument()

    End Function

    Protected Overridable Function SaveDocument()

    End Function

    Protected Overridable Function DiscardDocument()

    End Function

    Protected Overridable Function SearchDocument()

    End Function

    Protected Overridable Function OnExitForm()
        Me.Close()

    End Function

    Protected Overridable Function OnHelp()

    End Function

    Protected Overridable Function OnAboute()

    End Function

    Private Sub iNew_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles iNew.ItemClick
        NewDocument()
    End Sub

    Private Sub iFind_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles iFind.ItemClick
        SearchDocument()
    End Sub

    Private Sub iSave_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles iSave.ItemClick
        SaveDocument()
    End Sub

    Private Sub iHelp_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles iHelp.ItemClick
        OnAboute()
    End Sub

    Private Sub iAbout_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles iAbout.ItemClick
        OnHelp()
    End Sub

    Private Sub iSaveAs_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles iSaveAs.ItemClick
        'DiscardDocument()
    End Sub
End Class
